var routes = [
  {
    path: '/index',
    name: 'index',
    component: () => import('../views/index.vue'),
    children:[
      {
        path:'/index/shangpin',//路由地址
        name:'shangpin',//路由地址的别名
        component:()=>import('../views/index/shangpin.vue'),//对应的组件,
        
      },
      {
        path:'/index/bbt',//路由地址
        name:'bbt',//路由地址的别名
        component:()=>import('../views/index/bbt.vue'),//对应的组件,
        
      },
    ]
  },
    // {
    //   path: '/home',
    //   name: 'home',
    //   component: () => import('../views/HomeView.vue')
    // },
    // {
    //   path: '/about',
    //   name: 'about',
    //   component: () => import('../views/AboutView.vue')
    // },
    {
      path:'/',
      redirect:'/index/shangpin',
      component:()=>import('../views/index/shangpin.vue')
  },
]

export default routes;